import request from '@/utils/request';
// /base/bussinesscategory/list
/**
 * 获取业务类型列表
 * @returns 
 */
export const getBussinesscategoryList = (params) => 
  request({
    url: `/base/bussinesscategory/list`,
    method: 'get',
    params
  })

  ///base/bussinesscategory/getinfo/{id}

  /**
   * 获取业务类型信息
   * @param {*} id 
   * @returns 
   */
  export const getBussinesscategoryInfo = (id) => 
  request({
    url: `/base/bussinesscategory/getinfo/${id}`,
    method: 'get',
  })

  ///base/bussinesscategory/add
  /**
   * 添加业务类型
   * @param {*} data 
   * @returns 
   */
  export const bussinesscategoryAdd = (data) => 
  request({
    url: `/base/bussinesscategory/add`,
    method: 'post',
    data,
  })

  ///base/bussinesscategory/edit
  /**
   * 修改业务类型
   * @param {*} data 
   * @returns 
   */
  export const bussinesscategoryEdit = (data) => 
  request({
    url: `/base/bussinesscategory/edit`,
    method: 'post',
    data,
  })

  ///base/bussinessitems/list
  /**
   * 获取指标列表
   * @returns 
   */
  export const getBussinessitemsList = (params) => 
  request({
    url: `/base/bussinessitems/list`,
    method: 'get',
    params
  })

  ///base/bussinessitems/getinfo/{id}
  /**
   * 获取指标信息
   * @param {*} id 
   * @returns 
   */
  export const getBussinessitemsInfo = (id) => 
  request({
    url: `/base/bussinessitems/getinfo/${id}`,
    method: 'get',
  })

  // /base/bussinessitems
  /**
   * 添加 编辑 指标
   * @param {*} data 
   * @returns 
   */
  export const bussinessitemsAdd = (data) => 
  request({
    url: `/base/bussinessitems/add`,
    method: 'post',
    data,
  })
  export const bussinessitemsEdit = (data) => 
  request({
    url: `/base/bussinessitems/edit`,
    method: 'post',
    data,
  })
// /base/bussinessitems/remove/{ids}
/**
 * 删除指标
 * @param {*} ids 
 * @returns 
 */
export const bussinessitemsRemove = (ids) => 
  request({
    url: `/base/bussinessitems/remove/${ids}`,
    method: 'get',
  })

  // /base/wateritem/distinctitemlist
  /**
   * 获取业务类型下的业务项- 因子列表
   * @returns 
   */
  export const getWateritemDistinctitemlist = () => 
  request({
    url: `/base/wateritem/distinctitemlist`,
    method: 'get',
  })
